package com.netease.nie.base.exceptions;

import com.netease.nie.base.protocol.SystemResponseCode;

/**
 * 
 * @author KingsHunter
 * @createDate May 30th,2016
 *
 */
public class BusinessException extends SystemException {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5542010480764511610L;
	
	private int code;
	
	private String msg;
	
    public BusinessException() {
		super("系统内部错误");
    	this.code = SystemResponseCode.INTERNAL_ERROR.getCode();
	}

	public BusinessException(int code, String msg) {
		super(msg);
		this.code = code;
		this.msg = msg;
	}

	public BusinessException(int errorCode, String message, Object... args) {
        super(String.format(message, args));
        this.code = errorCode;
    }

    public int getErrorCode() {
        return code;
    }

    public void setErrorCode(int errorCode) {
        this.code = errorCode;
    }

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public String getErrorTitle() {
		return null;
	}

	public String getErrorDescription() {
		return null;
	}

}
